
package Q44;


public class Test {
    private double x,y;
    
    public Test (){
        x = 0;
        y = 0;
    }
    public Test (double x , double y ){
        this.x = x;
        this.y = y;
    }
    public double getX(){
        return x;
    }
    public double getY(){
        return y;
    }
    
    public double distance(Test n){
        return Math.sqrt(Math.pow(n.getX()-x,2) + Math.pow(n.getY()-y,2));
    }
    }
